package com.xc.quickstart.admin;

import com.alibaba.nacos.spring.context.annotation.config.EnableNacosConfig;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author : pdl
 * @date : 2021/3/23 10:17
 */
@EnableNacosConfig
@SpringBootApplication(exclude = {
        DataSourceAutoConfiguration.class,
        RedisAutoConfiguration.class})
@Slf4j
@ComponentScan(basePackages = {"com.xc.quickstart"})
@EnableAsync
@EnableDubbo(scanBasePackages = "com.xc.quickstart.rpc.impl")
@EnableFeignClients(basePackages = {"com.xc.quickstart.manager"})
@NacosPropertySource(dataId = "tclife-crm-db", groupId = "tclife-crm", autoRefreshed = true)
@NacosPropertySource(dataId = "tclife-crm-mw", groupId = "tclife-crm", autoRefreshed = true)
@NacosPropertySource(dataId = "tclife-crm-common", groupId = "tclife-crm", autoRefreshed = true, first = true)
public class AdminApplication {
    public static void main(String[] args) {
        SpringApplication.run(AdminApplication.class, args);
    }
}
